unit NfiItem;

interface

type
  TNFiItem = class
  private
    FIDFNota        : integer;
    FSequencia      : integer;
    FCodigo         : string;
    FValorUnitario  : real;
    FQuantidade     : real;
    FValorIPI       : real;
    FValorICMS      : real;
    FValorISS       : real;
    FAliquotaIPI    : real;
    FAliquotaICMS   : real;
    FAliquotaISS    : real;
    FBaseICMS       : real;
    FBaseICMSST     : real;
    FValorICMSST    : real;
    FAliquotaICMSST : real;
    FCL_ICMS        : string;
  public
    property IDFNota        : integer read FIDFNota write FIDFNota;
    property Sequencia      : integer read FSequencia write FSequencia;
    property Codigo         : string read FCodigo write FCodigo;
    property ValorUnitario  : real read FValorUnitario write FValorUnitario ;
    property ValorIPI       : real read FValorIPI;
    property ValorICMS      : real read FValorICMS;
    property ValorISS       : real read FValorISS;
    property AliquotaIPI    : real read FAliquotaIPI write FAliquotaIPI;
    property AliquotaICMS   : real read FAliquotaISS write FAliquotaISS;
    property AliquotaISS    : real read FAliquotaISS write FAliquotaISS;
    property BaseICMS       : real read FBaseICMS write FBaseICMS;
    property BaseICMSST     : real read FBaseICMSST write FBaseICMSST;
    property ValorICMSST    : real read FValorICMSST;
    property AliquotaICMSST : real read FAliquotaICMSST write FAliquotaICMSST;
    property CL_ICMS        : string read FCL_ICMS write FCL_ICMS;
    function ValorTotalItem : real;
    function ValorTotalImpostos : real;
    function ValorTotalComImpostos : real;
  end;

implementation

{ TNFiItem }

function TNFiItem.ValorTotalComImpostos: real;
begin
  Result := ValorTotalItem + ValorTotalImpostos;
end;

function TNFiItem.ValorTotalImpostos: real;
begin
  Result := (FValorIPI + FValorICMS + FValorICMSST + FValorISS) * FQuantidade;
end;

function TNFiItem.ValorTotalItem: real;
begin
  Result := FQuantidade * FValorUnitario;
end;

end.
